import request from '@/utils/request'
import { CommentDto, CommentPage, QueryComment } from '@/types/comment'

/**
 * 获取文章分类
 * @returns
 */
export const queryCommentList = (params: QueryComment): ResponseResult<CommentPage> =>
  request({
    url: `${import.meta.env.VITE_APP_BASE_API}/comment/commentList`,
    method: 'GET',
    params
  })
/**
 * 获取文章分类
 * @returns
 */
export const comment = (data: CommentDto): ResponseDefault =>
  request({
    url: `${import.meta.env.VITE_APP_BASE_API}/comment`,
    method: 'POST',
    data,
    headers: {
      login: true
    }
  })
